<form method="POST" enctype="multipart/form-data">
{% csrf_token %}
    <input type="file" name="img">
    <button type="submit">上传</button>
</form>